<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template/template2.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreatePropertyTitle}"></h:outputText>
        </ui:define>
        <ui:define name="content">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_propertyId}" for="propertyId" />
                    <h:inputText id="propertyId" value="#{propertyController.selected.propertyId}" title="#{bundle.CreatePropertyTitle_propertyId}" required="true" requiredMessage="#{bundle.CreatePropertyRequiredMessage_propertyId}"/>
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_country}" for="country" />
                    <h:inputText id="country" value="#{propertyController.selected.country}" title="#{bundle.CreatePropertyTitle_country}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_city}" for="city" />
                    <h:inputText id="city" value="#{propertyController.selected.city}" title="#{bundle.CreatePropertyTitle_city}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_district}" for="district" />
                    <h:inputText id="district" value="#{propertyController.selected.district}" title="#{bundle.CreatePropertyTitle_district}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_address}" for="address" />
                    <h:inputText id="address" value="#{propertyController.selected.address}" title="#{bundle.CreatePropertyTitle_address}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_noOfBedroom}" for="noOfBedroom" />
                    <h:inputText id="noOfBedroom" value="#{propertyController.selected.noOfBedroom}" title="#{bundle.CreatePropertyTitle_noOfBedroom}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_noOfBathroom}" for="noOfBathroom" />
                    <h:inputText id="noOfBathroom" value="#{propertyController.selected.noOfBathroom}" title="#{bundle.CreatePropertyTitle_noOfBathroom}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_price}" for="price" />
                    <h:inputText id="price" value="#{propertyController.selected.price}" title="#{bundle.CreatePropertyTitle_price}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_imageURL}" for="imageURL" />
                    <h:inputText id="imageURL" value="#{propertyController.selected.imageURL}" title="#{bundle.CreatePropertyTitle_imageURL}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_isUsed}" for="isUsed" />
                    <h:inputText id="isUsed" value="#{propertyController.selected.isUsed}" title="#{bundle.CreatePropertyTitle_isUsed}" required="true" requiredMessage="#{bundle.CreatePropertyRequiredMessage_isUsed}"/>
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_status}" for="status" />
                    <h:inputText id="status" value="#{propertyController.selected.status}" title="#{bundle.CreatePropertyTitle_status}" required="true" requiredMessage="#{bundle.CreatePropertyRequiredMessage_status}"/>
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_modeOfPay}" for="modeOfPay" />
                    <h:inputText id="modeOfPay" value="#{propertyController.selected.modeOfPay}" title="#{bundle.CreatePropertyTitle_modeOfPay}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_rent}" for="rent" />
                    <h:inputText id="rent" value="#{propertyController.selected.rent}" title="#{bundle.CreatePropertyTitle_rent}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_deposit}" for="deposit" />
                    <h:inputText id="deposit" value="#{propertyController.selected.deposit}" title="#{bundle.CreatePropertyTitle_deposit}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_typeHouse}" for="typeHouse" />
                    <h:inputText id="typeHouse" value="#{propertyController.selected.typeHouse}" title="#{bundle.CreatePropertyTitle_typeHouse}" />
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_modeOfTransport}" for="modeOfTransport" />
                    <h:inputText id="modeOfTransport" value="#{propertyController.selected.modeOfTransport}" title="#{bundle.CreatePropertyTitle_modeOfTransport}" required="true" requiredMessage="#{bundle.CreatePropertyRequiredMessage_modeOfTransport}"/>
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_isfurniture}" for="isfurniture" />
                    <h:inputText id="isfurniture" value="#{propertyController.selected.isfurniture}" title="#{bundle.CreatePropertyTitle_isfurniture}" required="true" requiredMessage="#{bundle.CreatePropertyRequiredMessage_isfurniture}"/>
                    <h:outputLabel value="#{bundle.CreatePropertyLabel_squareFootage}" for="squareFootage" />
                    <h:inputText id="squareFootage" value="#{propertyController.selected.squareFootage}" title="#{bundle.CreatePropertyTitle_squareFootage}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{propertyController.create}" value="#{bundle.CreatePropertySaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{propertyController.prepareList}" value="#{bundle.CreatePropertyShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreatePropertyIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
